<?php
/**
 *
 * Created by JetBrains PhpStorm.
 * Author: fengchao
 * Date: 12-1-31
 * Time: 上午10:27
 * Copyright: Copyright (c) 2012 - 2013,FengChao. All rights reserved.
 * Link: http://hellophp.net
 * Since: Version 1.0
 */
class Sximg extends CI_Controller{
    
    public  function big(){
        $id=$this->input->get("id");
        empty($id)?$id=rand(1000,9999):$id;
        $write = "ID:".$id;
        $this->load->library('image_lib');
        $b = substr(BASEPATH, 0, -7);
        $config2['image_library'] = 'gd2';
        $config['source_image'] = $b.'images/bg.jpg';
        $config['wm_text'] = $write;
        $config['wm_type'] = 'text';
        $config['wm_font_size'] = '20';
        $config['wm_font_color'] = '993300';
        $config['wm_vrt_alignment'] = 'middle';
        $config['wm_hor_alignment'] = 'center';
        $config['dynamic_output']=true;
        $config['wm_font_path'] = $b.'images/heiti.ttf'; 
        $this->image_lib->initialize($config);
        $this->image_lib->watermark();
    }

}